package com.sudu.service;

import com.sudu.domain.Attention;
import com.sudu.domain.Favorite;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface likeService {

    /**
     *   初次收藏
     * @param favorite
     * @return boolean
     */
    boolean saveFavorite (Favorite favorite) ;

    /**
     *   初次关注
     * @param attention
     * @return boolean
     */
    boolean saveAttention (Attention attention) ;

    /**
     * 改变收藏的状态
     * @param uid
     * @param vid
     * @return boolean
     */
    boolean changeFavorite(int uid , int vid ,int newDelete) ;

    /**
     * 改变关注的状态
     * @param uid
     * @param likeId
     * @return boolean
     */
    boolean changeAttention(int uid , int likeId ,int newDelete) ;

    /**
     * 判断是否初始收藏
     * @param uid
     * @param vid
     * @return Favorite
     */
    Favorite IfFavorite(int uid , int vid) ;

    /**
     *  判断是否初始关注
     * @param uid
     * @param likeId
     * @return Attention
     */
    Attention IfAttention(int uid , int likeId) ;

    /**
     * 查找我的关注
     * @param uid
     * @return 我关注的up主id 数量
     */
    int selectUidNum(int uid) ;

    /**
     * 查找我的粉丝
     * @param uid
     * @return 我的粉丝 数量
     */
    int selectLikeIdNum(int uid) ;

    /**
     *  查找用户收藏视频
     * @param uid 用户id
     * @return int[] ，视频id数组
     */
    int[] selectVidByUid(int uid) ;
}
